package com.jvyou.factory;

/**
 * @author 橘柚
 * @version 1.0-SNAPSHOT
 * @Date 2024/7/6 18:47
 * @Description 折扣促销
 */
public class DiscountPromotion implements Promotion {

    // 折扣率
    private final Double discount;

    public DiscountPromotion(Double discount) {
        this.discount = discount;
    }

    @Override
    public Double applyPromotion(Double price) {
        return price * discount;
    }
}
